<template>
    <div class="list-info-box">
        <div class="header-box">{{type_i?"付款":"收款"}}流水详情</div>
        <div class="obj-box">
            <div>
                <p>流水类型</p>
                <span>{{data_obj.scode}}</span>
            </div>
            <div>
                <p>发生金额</p>
                <span :class="Number(data_obj.money) > 0?'correct':'negative'">{{data_obj.money}}</span>
            </div>
            <div>
                <p>发生时间</p>
                <span>{{data_obj.atime}}</span>
            </div>
            <div class="border">
                <p>{{type_i?"资金账户":"收款方式"}}</p>
                <span>{{data_obj.payid}}</span>
            </div>
            <div>
                <p>经手人</p>
                <span>{{data_obj.uname}}</span>
            </div>
            <div>
                <p>相关单号</p>
                <span>{{data_obj.odid}}</span>
            </div>
            <div>
                <p>备注说明</p>
                <span>{{data_obj.txt}}</span>
            </div>
        </div>
    </div>
</template>

<script>
import config from "@/js/conf/Config.js";

export default {
    props: ['type_i',],
    data () {
        return {
            ch: 1,
            data_obj: {},
        }
    },
    created () {
    },  
    methods: {
        async getBillInfo (id) {
            let url = config.CUSTOM_ABILL_INFO;
            let param = {
                id: id,
                ch: this.ch,
            };
            let res = await this.$api({ url: url, data: param });
            if (!res.status) return false
            this.data_obj = res.data;
        }
    }
}
</script>

<style lang="scss" scoped>
    div,p,span{
        box-sizing: border-box;
    }
    .list-info-box {
        width: calc(100% - 345px);
        .header-box {
            width: 100%;
            height: 51px;
            border-bottom: 1px solid #e8dcdc;
            font-size: 18px;
            line-height: 51px;
            padding: 0 10px;
        }
        .obj-box {
            width: 100%;
            > div {
                width: 100%;
                height: 50px;
                line-height: 50px;
                display: flex;
                padding-left: 30px;
                border-bottom: 1px solid #f2f2f2;
                font-size: 14px;

                p {
                    width: 120px;
                }
                span {
                    color: #888888;
                }
            }
            .border {
                height: 65px;
                border-bottom: 15px solid #f2f2f2;
            }
            .correct {
                color: #00cc00;
            }
            .negative {
                color: red;
            }
        }
    }
</style>